
package org.upt.dcda;

import java.util.List;

import org.upt.dcda.db.BookEntity;
import org.upt.dcda.db.BookReviewEntity;
import org.upt.dcda.db.TagEntity;
import org.upt.dcda.exceptions.BookstoreException;

public interface BookManager
{

	public static final String	BOOK_BEAN_NAME	= "java:global/BookstoreEAR/BookstoreLogic/BookManagerBean!org.upt.dcda.BookManagerBeanRemote";

	public BookEntity addBook(String title, String description, int authorId, int price, int quantity)
			throws BookstoreException;

	public void modifyBook(int bookId, String title, String description, int authorId, int price)
			throws BookstoreException;

	public void updateStock(int bookId, int stock) throws BookstoreException;

	public void deleteBook(int bookId) throws BookstoreException;

	public void addReview(int bookId, int userId, String content, int mark) throws BookstoreException;

	public BookEntity getBookById(int bookId) throws BookstoreException;

	public List<BookReviewEntity> getBookReviewByBookId(int bookId) throws BookstoreException;

	public List<TagEntity> getBooktagsByBookId(int bookId) throws BookstoreException;

}
